//
//  ZanButton.m
//  BOSS-SOOC
//
//  Created by 段帅 on 16/10/17.
//  Copyright © 2016年 Gcx. All rights reserved.
//

#import "ZanButton.h"
#import "SCToolManager.h"
#import "SCUIToolHeader.h"
#define Color_title_black_26 [UIColor colorWithWhite:0.74 alpha:1]
#define NormalFont(A) [UIFont systemFontOfSize:A/2]
@implementation ZanButton


-(instancetype)initWithFrame:(CGRect)frame{
    
    if (self =[super initWithFrame:frame]) {
        [self createUI];
    }
    return self;
    
}
-(void)createUI{
    
    _imageIcon = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 18, 18)];
    
    _title_text = [[UILabel alloc]initWithFrame:CGRectMake(22, 0, 20, 18)];
    _title_text.font = NormalFont(24);
    _title_text.textColor = Color_title_black_26;
    [self addSubview:_imageIcon];
    [self addSubview:_title_text];
    
    
    
    
}
-(void)setSelected:(BOOL)selected{
    
    [super setSelected:selected];
    
    if (selected) {
        
        _imageIcon.image =[SCToolManager imageWithName:@"点赞-pass" InBundle:@"ToolImage" className:[self class]] ;
        _title_text.textColor = Color_Main;
    }else{
        _imageIcon.image =[SCToolManager imageWithName:@"点赞-normal" InBundle:@"ToolImage" className:[self class]] ;
        _title_text.textColor = Color_title_black_26;
        
    }
    
    
    
}


/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
